package com.lzh.others.tree;

import lombok.Data;

import java.util.ArrayList;
import java.util.List;

/**
 * @Classname TreeNode
 * @Description 树模型
 * @Date 2021/12/17 10:39
 * @Created by liuzihao
 */
@Data
public class TreeNode {
    protected int id;
    protected int parentId;
    protected String name;
    protected List<TreeNode> children = new ArrayList<>();

    public void add(TreeNode node){
        children.add(node);
    }
}
